﻿using Microsoft.Extensions.DependencyInjection;

namespace Pangeo.Admin.Tasks
{
    public static class _ServiceRegister
    {
        /// <summary>
        /// 添加应用的服务
        /// </summary>
        /// <param name="services"></param>
        /// <returns></returns>
        public static IServiceCollection AddBrazorAdminTasks(this IServiceCollection services)
        {
            // 注册定时任务服务
            services.AddSingleton<SystemTask>();
            services.AddHostedService<HostedService>();

            return services;
        }
    }
}
